<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html >
<head>
	<meta name="decorator" content="moduleEdit"/>
	<link href="${staticPath}/lib/datetimepicker/0.0.11/css/bootstrap-datetimepicker.min.css" rel="stylesheet" type="text/css">
	<link href="${staticPath}/lib/chosen/1.1.0/chosen.min.css" rel="stylesheet" type="text/css">
	<link rel="stylesheet"href="${staticPath}/lib/ztree/3.5/css/zTreeStyle/zTreeStyle.css"type="text/css">
	<script type="text/javascript" src="${staticPath}/js/jQuery.FillOptions.js"></script>
	<script type="text/javascript" src="${staticPath}/js/decimalinput.js"></script>
	<script type="text/javascript" src="${staticPath}/js/jquery-dialog.js"></script>
	<script src="${staticPath}/lib/chosen/1.1.0/chosen.jquery.js" type="text/javascript"></script>
	<script src="${staticPath}/js/ossp-jquery-chosen.js" type="text/javascript"></script>
	<script type="text/javascript" src="${staticPath}/lib/ztree/3.5/js/jquery.ztree.all-3.5.js"></script>
	
	<script type="text/javascript" src="${staticPath}/js/jquery-att-dialog.js"></script>
	<script type="text/javascript">
	var num = '${fn:length(intAssociated.intAssbrandsList)}';
	</script>
	<script type="text/javascript" src="${staticPath}/js/intAssociated.js"></script>
	<script type="text/javascript">
	//清除合同签订人
	function cleanSignBy(){
		$("#signBy").val("");
		$("#signById").val("");
	}
	
	$(document).ready(function() {
		//取得税率
		var taxTypeCode = $("#taxTypeCode").val();
		var url = "${contextPath}/biz/contract/commonContract/"+taxTypeCode+"/getTaxRateTypeCode";
		$.get(url,function(data){
			var taxRateObj = eval('(' + data + ')');
			for(var i = 0; i<taxRateObj.length;i++){
				var taxRate =taxRateObj[i];
				if(taxRate.taxRateNum == $("#taxRateCode").val()){
					$("#taxRate").val(taxRate.taxRate);
				}
			}
			
		});
		
		$("#buildArea").decimalinput();
		$("#areaCoefficient").decimalinput();
		$("#jobCardAmount").decimalinput();
		$("#trainingAmount").decimalinput();
		//*******************验证表单********************************************
		var validation = function(){
			
			if($("#signBy").val() =="" ){
				$("#signBy").focus();
				top.$.jBox.tip('意向签订人不能为空', 'warning');
				return false;
			}
			if($("#purchaseOrg").val() =="" ){
				$("#purchaseOrg").focus();
				top.$.jBox.tip('采购组织不能为空', 'warning');
				return false;
			}
			if($("#isUpToStandard").val() =="" ){
				$("#isUpToStandard").focus();
				top.$.jBox.tip('是否符合标准不能为空', 'warning');
				return false;
			}
			
			if($("#createBy").val() == ""){
				$("#createBy").focus();
				top.$.jBox.tip('提报人不能为空', 'warning');
				return false;
			}
		}
		
		
		var brandListLength ="${fn:length(negAssbrands)}";
		var list = new Array();
		for(var i=0;i<brandListLength;i++){
			list.push(i);
		}
		//保存意向
		$("#save").click(function(){
			var intentName = "";
			var flag =validation();
			if (flag == false) {
				return;
			}
			//生成合同名称
			for(var j=0;j<list.length;j++){
				if($("#isMainBrand"+list[j]).val() =="1"){
					intentName += $("#brandCName"+list[j]).val();
				}
			}
			var businessTypeCode = $("#businessType").val();
			var businessType ="";
			$("#businessType").children("option").each(function(){
				if($(this).val() ==businessTypeCode){
					if($(this).val() ==""){
						businessType +="";
					}else{
						businessType += $(this).text();
					}
				}
			});
			intentName += businessType;
			intentName += $("#store").val();
			$("#subject").val(intentName);
			Oosp_Loading('正在保存，请稍等...');
			$("#intAssociatedForm").submit();
		});
		
		$("#submit_wokFlow").click(function(){
			var intentName = "";
			var flag =validation();
			if (flag == false) {
				return;
			}
			//生成合同名称
			for(var j=0;j<list.length;j++){
				if($("#isMainBrand"+list[j]).val() =="1"){
					intentName += $("#brandCName"+list[j]).val();
				}
			}
			var businessTypeCode = $("#businessType").val();
			var businessType ="";
			$("#businessType").children("option").each(function(){
				if($(this).val() ==businessTypeCode){
					businessType += $(this).text();
				}
			});
			intentName += businessType;
			intentName += $("#store").val();
			$("#subject").val(intentName);
			Oosp_Loading('正在提交，请稍等...');
			$('#intAssociatedForm').attr('action','${contextPath}/biz/intent/intAdvertociated/submit?navId=${navId}');
			$("#intAssociatedForm").submit();
		});
		$("#AddAtt").AttDialog($("#IntAttTable").children("tr").length+1);
	});
	</script>
	<style type="text/css">
#barndModal .modal-dialog  {width:60%;}
#intAssitems .modal-dialog  {width:60%;}
#assbasemodal .modal-dialog  {width:60%;}
#terminateDateModal .modal-dialog  {width:30%;}
.texthidden{ width:190px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
</style>
</head>
<body>
	<div class="Report_f">
	<form action="${contextPath}/biz/intent/intAdvertociated/save?navId=${navId}" class="form-horizontal" id="intAssociatedForm" method="POST">
		<div class="Report_f_1">
			
			<div class="Report_f_title_1">广告合同
			<c:if test="${intAssociated.isModifyContract =='1'}">变更</c:if>
			<c:if test="${intAssociated.isModifyContract !='1'}">
			<ossp:value dictType="CONTRATC_ATTRIBUTE" key="${intAssociated.intentType}"></ossp:value>
			</c:if>意向
				<a class="btn btn-danger btn_5 btn_right"  href="${contextPath}/biz/intent/intAdvertociated/list?navId=${navId}">返回</a>
			</div>
			<ul class="nav nav-tabs Report_f_title_2" id="myTab">
			 	<li class="active"><a href="#home" data-toggle="tab">意向基本信息</a></li>
			 		<li><a href="#IntAttachment" data-toggle="tab">合同附件</a></li> 
			  		<li><a href="#workflow" data-toggle="tab">流程审批</a></li> 
			  
			  		<li><a href="#diagram" data-toggle="tab">流程图</a></li>
			  </ul>
			<div>
				<input type="hidden" id="contractId" name="contractId" value="${intAssociated.contractId}" >
				<input type="hidden" id="subject" name="subject">
				<input type="hidden" id="id" name="id" value="${intAssociated.id}">
				<input type="hidden" id="isContractModify" name="isContractModify" value="${intAssociated.isContractModify}">
				<input type="hidden" id="isCreateContract" name="isCreateContract" value="${intAssociated.isCreateContract}">
				<input type="hidden" id="status" name="status" value="${intAssociated.status}">
				<input type="hidden" id="negotiationId" name="negotiationId" value="${intAssociated.negotiationId}">
				<input type="hidden" id='intent_type' value="intAssociated">
				<input type="hidden" id="intentType" name="intentType" value="${intAssociated.intentType}">
				<input type="hidden" id="contractType" name="contractType" value="${intAssociated.contractType}">
				<input type="hidden" id="intentNo" name="intentNo" value="${intAssociated.intentNo}">
				<input type="hidden" id="isSalesNo" name="isSalesNo" value="${intAssociated.isSalesNo}">
				
				<input type="hidden" value="status" id="status" />
				<div class="tab-content Report_f_title_3 ">
					<div class="tab-pane active" id="home">
						<div class="Report_f_title_4">
							<div class="f_6">
								<span class="col-sm-6"><strong>广告合同意向主信息:</strong></span>
							</div>
						</div>
						<div class="Report_f_title_4">
							<div class="f_2">
									<div class="form-group col-sm-6">
										<label for="inputtext3" class="col-sm-3 control-label f_4"><span class="span-required" style="color:red">*</span>区域:</label>
										<div class="col-sm-6 f_6">
											<input id="area" name="area" value="${intAssociated.area}" readonly="readonly"  class="f_5" />
											<input type="hidden" id="areaId" name="areaId" value="${intAssociated.areaId}">
										</div>
									</div>
									<div class="form-group col-sm-6">
										<label for="inputtext3" class="col-sm-3 control-label f_4"><span class="span-required" style="color:red">*</span>是否符合标准:</label>
										<div class="col-sm-6 f_6">
											<ossp:radio dictType="YESORNO"  id="isUpToStandard" name="isUpToStandard" value="${intAssociated.isUpToStandard}" defaultChecked="1"></ossp:radio>
										</div>
									</div>
								</div>
								<div class="f_2">
									<div class="form-group col-sm-6">
										<label for="inputtext3" class="col-sm-3 control-label f_4"><span class="span-required" style="color:red">*</span>合同开始时间:</label>
										<div class="col-sm-6 f_6">
											<div class="input-group date  o-a-form-datetime " data-date="" data-date-format="yyyy-mm-dd">
												<input class="f_5" readonly id="startDate1" readonly="readonly" name="startDate1"value="<fmt:formatDate value="${intAssociated.startDate}" type="both" pattern="yyyy-MM-dd"/> "size="10" type="text" /> 
												<input type="hidden" id="startDate"  readonly="readonly" name="startDate" value="<fmt:formatDate value="${intAssociated.startDate}" type="both" pattern="yyyy-MM-dd"/>" />
												<span class="input-group-addon f_time"><i class="glyphicon glyphicon-remove"></i></span>
	                           					 <span class="input-group-addon f_time"><span class="glyphicon glyphicon-calendar"></span></span>
											</div>
										</div>
									</div>
									<div class="form-group col-sm-6">
										<label for="inputtext3" class="col-sm-3 control-label f_4"><span class="span-required" style="color:red">*</span>合同结束时间:</label>
										<div class="col-sm-6 f_6">
											<div class="input-group date  o-a-form-datetime " data-date="" data-date-format="yyyy-mm-dd">
												<input class="f_5" id="endDate1" name="endDate1" readonly="readonly" size="10"  value=" <fmt:formatDate value="${intAssociated.endDate}" type="both" pattern="yyyy-MM-dd"/> " type="text" /> 
												<input type="hidden" id="endDate" name="endDate" readonly="readonly" value="<fmt:formatDate value="${intAssociated.endDate}" type="both" pattern="yyyy-MM-dd"/>" />
												<span class="input-group-addon f_time"><i class="glyphicon glyphicon-remove"></i></span>
	                           					 <span class="input-group-addon f_time"><span class="glyphicon glyphicon-calendar"></span></span>
											</div>
											<span id="endDateMessage" class=" help-inline" style="color: red;"></span>
										</div>
									</div>
								</div>
								<input type="hidden" id="supplierNo" name="supplierNo" value="${intAssociated.supplierNo}">
								<input type="hidden" id="supplierId" name="supplierId" value="${intAssociated.supplierId}">
								<div class="f_2">
									<div class="form-group col-sm-6">
										<label for="inputtext3" class="col-sm-3 control-label f_4"><span class="span-required" style="color:red">*</span>供应商名称:</label>
										<div class="col-sm-6 f_6">
											<input id="supplierName" name="supplierName" readonly="readonly" value="${intAssociated.supplierName}"  class="f_5" />
										</div>
									</div>
									<div class="form-group col-sm-6">
										<label for="inputtext3" class="col-sm-3 control-label f_4"><span class="span-required" style="color:red">*</span>业态:</label>
										<div class="col-sm-6 f_6">
											<input type="text"  id="format" class="f_5"  maxlength="200" value="${format.name}">
											<input type="hidden"  id="formatId" class="f_5"  maxlength="200" name="formatId" value="${intAssociated.formatId}">
										</div>
									</div>
								</div>
								<div class="f_3">
									<div class="form-group col-sm-6">
										<label for="inputtext3" class="col-sm-3 control-label f_4"><span class="span-required" style="color:red">*</span>签约主体:</label>
										<div class="col-sm-6 f_6">
											<input type="text" class="f_5"  readonly="readonly" value="${baseShop.companyName}">
											<input type="hidden" class="f_5" id="signBody" name="signBody" readonly="readonly" value="${intAssociated.signBody}">
										</div>
									</div>
									<div class="form-group col-sm-6">
										<label for="inputtext3" class="col-sm-3 control-label f_4"><span class="span-required" style="color:red">*</span>主合同号:</label>
										<div class="col-sm-6 f_6">
											<input type="text"  id="mainContractNo" class="f_5" id="mainContractNo"  maxlength="200" value="${intAssociated.mainContractNo}">
										</div>
									</div>
								</div>
								
								
								<div class="f_2">
									<div class="form-group col-sm-6">
										<label for="inputtext3" class="col-sm-3 control-label f_4"><span class="span-required" style="color:red">*</span>门店:</label>
										<div class="col-sm-6 f_6">
											<input id="store" name="store" readonly="readonly" value="${intAssociated.store}" class="f_5  readonly" />
											<input type="hidden" id="storeId" name="storeId" value="${intAssociated.storeId}">
										</div>
									</div>
									<div class="form-group col-sm-6">
										<label for="inputtext3" class="col-sm-3 control-label f_4"><span class="span-required" style="color:red">*</span>楼层:</label>
										<div class="col-sm-6 f_6">
											<input type="hidden" id="floorId" readonly="readonly" name="floorId" value="${intAssociated.floorId}">
											<input id="floor" name="floor" readonly="readonly" value="${intAssociated.floor}" class="f_5" />
										</div>
									</div>
								</div>
								<div class="f_3">
									<div class="form-group col-sm-6">
										<label for="inputtext3" class="col-sm-3 control-label f_4"><span class="span-required" style="color:red">*</span>商铺号:</label>
										<div class="col-sm-6 f_6">
											<input id="shop" name="intAssshopsList[0].shop" readonly="readonly" maxlength="200"value="${shopId}" class="f_5" /> 
											<input type="hidden" id="shopIds"name="intAssshopsList[0].shopIds" value="${shopId}" />
										</div>
									</div>
									<div class="form-group col-sm-6">
										<label for="inputtext3" class="col-sm-3 control-label f_4"><span class="span-required" style="color:red">*</span>意向签订人:</label>
										<div class="col-sm-6 f_6">
											<div class="input-group">
												<input type="hidden" id="signById" readonly="readonly" name="signById" value="${intAssociated.signById}" maxlength="200" class="f_5 required" />
												<input id="signBy" readonly="readonly" name="signBy" value="${intAssociated.signBy}" maxlength="200" class="f_5 required" />
												<span class="input-group-addon f_time"><a href="#" onclick="cleanSignBy()"><i class="glyphicon glyphicon-remove"></i></a></span>
												<span class="input-group-btn">
													<button class="btn btn-default btn_3" id="userDialogMultiple"
														data-dialog="dialog" data-multiple="true"
														data-idField="signById" data-nameField="signBy"
														data-authType="USER" type="button">选择</button>
												</span>
											</div>
										</div>
									</div>
								</div>

						    <div class="f_2">
						   		<div class="form-group col-sm-6">
									<label for="inputtext3" class="col-sm-3 control-label f_4">是否变更:</label>
									<div class="col-sm-6 f_6">
										<input type="hidden" id="isModifyContract" name="isModifyContract" value="${intAssociated.isModifyContract}">
										<c:if test="${intAssociated.isModifyContract =='1'}">
											变更
										</c:if>
									</div>
								</div>
								<c:if test="${intAssociated.isModifyContract =='1'}">
								<div class="form-group col-sm-6">
										<label for="inputtext3" class="col-sm-3 control-label f_4"><span class="span-required" style="color:red">*</span>变更后生效日期:</label>
										<div class="col-sm-6 f_6">
											<div class="input-group date  o-a-form-datetime " data-date="" data-date-format="yyyy-mm-dd">
												<input class="f_5" id="effectDate1" name="effectDate1" readonly="readonly" size="10"  value=" <fmt:formatDate value="${intAssociated.effectDate}" type="both" pattern="yyyy-MM-dd"/> " type="text" /> 
												<input type="hidden" id="effectDate" name="effectDate" readonly="readonly" value="<fmt:formatDate value="${intAssociated.effectDate}" type="both" pattern="yyyy-MM-dd"/>" />
												<span class="input-group-addon f_time"><i class="glyphicon glyphicon-remove"></i></span>
	                           					 <span class="input-group-addon f_time"><span class="glyphicon glyphicon-calendar"></span></span>
											</div>
											<span id="endDateMessage" class=" help-inline" style="color: red;"></span>
										</div>
									</div>
								</c:if>
						</div>
						  <div class="f_3">
						  	  <div class="form-group col-sm-6">
									<label for="inputtext3" class="col-sm-3 control-label f_4">是否涉及条件/位置变化:</label>
									<div class="col-sm-6 f_6">
										<ossp:select defaultSelected="0" name="isCahAdd"  dictType="isEditItems" value="${intAssociated.isCahAdd}"></ossp:select>
									</div>
								</div>
								<div class="form-group col-sm-6">
									<label for="inputtext3" class="col-sm-3 control-label f_4">是否涉及条款修改:</label>
									<div class="col-sm-6 f_6">
										<ossp:select defaultSelected="0" name="isEditItems"  dictType="isEditItems" value="${intAssociated.isEditItems}"></ossp:select>
									</div>
								</div>
								
								
						  </div> 
							   	<div class="f_2">
								<div class="form-group col-sm-6">
									<label for="inputtext3" class="col-sm-3 control-label f_4">文本开始日期:</label>
									<div class="col-sm-7">
											<div class="input-group date  o-a-form-datetime " data-date="" data-date-format="yyyy-mm-dd">
											<input class="f_5" readonly="readonly" id="textStartDate" type="text" name="textStartDate" value="<fmt:formatDate value="${intAssociated.textStartDate}"  pattern="yyyy-MM-dd"/>" size="10"  /> 
											<span class="input-group-addon">
											<span
												class="glyphicon glyphicon-remove"></span></span> <span
												class="input-group-addon"><span
												class="glyphicon glyphicon-calendar"></span></span>

										</div>
									</div>
								</div>
								<div class="form-group col-sm-6">
									<label for="inputtext3" class="col-sm-3	 control-label f_4">文本结束日期:</label>
									<div class="col-sm-7">
											<div class="input-group date  o-a-form-datetime " data-date="" data-date-format="yyyy-mm-dd">
											<input class="f_5" readonly="readonly" id="textEndDate" type="text" name="textEndDate" value="<fmt:formatDate value="${intAssociated.textEndDate}"  pattern="yyyy-MM-dd"/>" size="10"  /> 
											<span class="input-group-addon">
											<span
												class="glyphicon glyphicon-remove"></span></span> <span
												class="input-group-addon"><span
												class="glyphicon glyphicon-calendar"></span></span>
										</div>
									</div>
								</div>
						</div>
						</div>
						   <div class="Report_f_title_4">
								<div class="f_6">
									<span class="col-sm-6"><strong>意向品牌信息:</strong></span>
								</div>
						  
						 	 <div class="o-l-search-builder f_9">
						  		<table class="table table-bordered" id="table1">
						  			<thead>
						  				<tr>
						  				<th class="text-center" colspan="4"><strong>品牌名称</strong></th>
								  			<td class="text-center" colspan="4"><strong>品牌英文名称</strong></td>
					  						<td class="text-center" colspan="4"><strong>招商分类</strong></td>
					  						<td class="text-center" colspan="4"><strong>会员卡折扣类型</strong></td>
					  						<td class="text-center" colspan="4"><strong>商铺</strong></td>
					  						<td class="text-center" colspan="4" ><strong>操作</strong></td>
								  		</tr>
								  	</thead>
								  	<tbody>
								  		<c:if test="${!empty intAssociated.intAssbrandsList}">
					  						<c:forEach items="${intAssociated.intAssbrandsList}" var="brand" varStatus="i">
					  							<tr>
									  				<td class="text-center" colspan="4">${brand.brandCName}
									  				<input type="hidden" id="intAssbrand_id${i.index}" value="${brand.id}">
									  				<input type="hidden" id="brandId${i.index}" name="intAssbrandsList[${i.index}].brandId" value="${brand.brandId}">
									  				<input type="hidden" id="brandCName${i.index}" name="intAssbrandsList[${i.index}].brandCName" value="${brand.brandCName}">
									  				<input type="hidden" id="brandEName${i.index}" name="intAssbrandsList[${i.index}].brandEName" value="${brand.brandEName}">
									  				<input type="hidden" id="brandLevel${i.index}" name="intAssbrandsList[${i.index}].brandLevel" value="${brand.brandLevel}">
									  				<input type="hidden" id="memberRateType${i.index}" name="intAssbrandsList[${i.index}].memberRateType" value="${brand.memberRateType}">
									  				<input type="hidden" id="commodityCate${i.index}" name="intAssbrandsList[${i.index}].commodityCate" value="${brand.commodityCate}">
									  				<input type="hidden" id="gcardDiscount${i.index}" name="intAssbrandsList[${i.index}].gcardDiscount" value="${brand.gcardDiscount}">
									  				<input type="hidden" id="gcardDiscount2${i.index}" name="intAssbrandsList[${i.index}].gcardDiscount2" value="${brand.gcardDiscount2}">
									  				<input type="hidden" id="ocardDiscount${i.index}" name="intAssbrandsList[${i.index}].ocardDiscount" value="${brand.ocardDiscount}">
									  				<input type="hidden" id="ocardDiscount2${i.index}" name="intAssbrandsList[${i.index}].ocardDiscount2" value="${brand.ocardDiscount2}">
									  				<input type="hidden" id="inviteCate${i.index}" name="intAssbrandsList[${i.index}].inviteCate" value="${brand.inviteCate}">
									  				<input type="hidden" id="isMainBrand${i.index}" name="intAssbrandsList[${i.index}].isMainBrand" value="${brand.isMainBrand}">
									  				<input type="hidden" id="brandInviteHead${i.index}" name="intAssbrandsList[${i.index}].brandInviteHead" value="${brand.brandInviteHead}">
									  				<input type="hidden" id="investmentCode${i.index}" name="intAssbrandsList[${i.index}].investmentCode" value="${brand.brandInviteHead}">
									  				<input type="hidden" id="brandNo${i.index}" name="intAssbrandsList[${i.index}].brandNo">
									  				<input type="hidden" id="brandAttribute${i.index}" name="intAssbrandsList[${i.index}].brandAttribute" value="${brand.brandAttribute}">
									  				<input type="hidden" id="intAssShopIds${i.index}" name="intAssbrandsList[${i.index}].intAssShopIds" value="${brand.intAssShopIds}" />
									  				<input type="hidden" id="intAssShopNames${i.index}" name="intAssbrandsList[${i.index}].intAssShopNames" value="${brand.intAssShopNames}"/>
									  				</td>
									  				<td class="text-center" colspan="4">${brand.brandEName}</td>
									  				<td class="text-center" colspan="4">${brand.inviteCate}</td>
									  				<td class="text-center" colspan="4"><ossp:value dictType="ONTRACT_MEMBER_RATE_" key="${brand.memberRateType}"></ossp:value></td>
									  				<td class="o-l-tab-ckb" id="shop_td${i.index}">
														${brand.intAssShopIds}
													</td>
													<td class="text-center" colspan="7" ><a href="javascript:void(0)" onclick="edit_brand(this,${i.index })">查看</a></td>
								  				</tr>
					  			</c:forEach>
					  		</c:if>
								  	</tbody>
						  		</table>
						  </div>
						</div>
						
						<div class="Report_f_title_4">
							<div class="f_6">
									<span class="col-sm-6"><strong>意向合同条款:</strong></span>
							</div>
							<div class="o-l-search-builder f_9">
								<table class="table table-bordered" id="table1">
									<thead>
								  		<tr>
								  			<td class="text-center" colspan="4"><strong>扣款项代码</strong></td>
								  			<td class="text-center" colspan="4"><strong>扣款项</strong></td>
					  						<td class="text-center" colspan="4"><strong>扣款类型</strong></td>
					  						<td class="text-center" colspan="4"><strong>扣款方式</strong></td>
					  						<td class="text-center" colspan="4"><strong>金额/比例</strong></td>
					  						<td class="text-center" colspan="4"><strong>开始日期</strong></td>
					  						<td class="text-center" colspan="4"><strong>结束日期</strong></td>
					  						<td class="text-center" colspan="4"><strong>操作</strong></td>
								  		</tr>
								  	</thead>
								  	<tbody>
								  		<c:if test="${!empty intAssociated.intAssitemsList}">
					  			<c:forEach items="${intAssociated.intAssitemsList}" var="assitem" varStatus="i">
									<tr>
										<td class="text-center" colspan="4">${assitem.deductCode}</td>
										<td class="text-center" colspan="4">${assitem.deductItem}</td>
										<td class="text-center" colspan="4"><ossp:value dictType="DEDUCT_CATE" key="${assitem.countBase}"></ossp:value></td>
										<td class="text-center" colspan="4"><ossp:value dictType="PAYMENT_TYPE" key="${assitem.deductType}"></ossp:value></td>
										<td class="text-center" colspan="4"><fmt:formatNumber value="${assitem.amount}" pattern="#.00#"/>
											<c:if test="${fn:startsWith(assitem.deductCode, 'A')}">%</c:if>
											<input type="hidden" id="intAssitems_id${i.index}" value="${assitem.id}">
											<input type="hidden" id="deductItem_items${i.index}" value="${assitem.deductItem}" name="intAssitemsList[${i.index}].deductItem">
											<input type="hidden" id="deductCate_items${i.index}" value="${assitem.deductCate}" name="intAssitemsList[${i.index}].deductCate">
											<input type="hidden" id="amount_items${i.index}" value="${assitem.amount}" name="intAssitemsList[${i.index}].amount">
											<input type="hidden" id="startDate_items${i.index}"  value="<fmt:formatDate value="${assitem.startDate}" type="both" pattern="yyyy-MM-dd"/>"  name="intAssitemsList[${i.index}].startDate">
											<input type="hidden" id="endDate_items${i.index}" value="<fmt:formatDate value="${assitem.endDate}" type="both" pattern="yyyy-MM-dd"/>" name="intAssitemsList[${i.index}].endDate">
											<input type="hidden" id="deductType_items${i.index }" value="${assitem.deductType}" name="intAssitemsList[${i.index}].deductType">
											<input type="hidden" id="deductCode_items${i.index }"  value="${assitem.deductCode}" name="intAssitemsList[${i.index}].deductCode">
											<input type="hidden" id="taxRate_items${i.index }" value="${assitem.taxRate}" name="intAssitemsList[${i.index}].taxRate">
											<input type="hidden" id="countBase_items${i.index }" value="${assitem.countBase}" name="intAssitemsList[${i.index}].countBase">
											<input type="hidden" id="remarks_items${i.index }" value="${assitem.remarks}" name="intAssitemsList[${i.index}].remarks">
											<input type="hidden" id="validType_items${i.index }" value="${assitem.validType}" name="intAssitemsList[${i.index}].validType">
										</td>
										<td class="text-center" colspan="4"><fmt:formatDate value="${assitem.startDate}" type="both" pattern="yyyy-MM-dd"/></td>
								  				<td class="text-center" colspan="4"><fmt:formatDate value="${assitem.endDate}" type="both" pattern="yyyy-MM-dd"/></td>
										<td class="text-center" colspan="8"><a href="javascript:void(0)" onclick="edit_items(this,${i.index})">查看</a></td>
									</tr>
					  			</c:forEach>
					  			
					  		</c:if>
								  	</tbody>
								</table>
							</div>
						</div>
						<div class="Report_f_title_4">
							<div class="f_6">
									<span class="col-sm-6"><strong>铺位信息:</strong></span>
							</div>
							<div class="o-l-search-builder f_9">
								<table class="table table-striped table-hover o-l-table"
									id="table1">
									<thead>
										<tr>
											<th style="width: 2px"></th>
											<th>广告位长度</th>
											<th>广告位宽度 </th>
											<th>广告位标准值</th>
										</tr>
									</thead>
								<tbody id="contractCommnWheres">
											
									</tbody>
								</table>
							</div>
						</div>
						<div class="Report_f_title_4">
							<div class="f_3">
								<div class="form-group col-sm-6">
											<label for="inputtext3" class="col-sm-3 control-label f_4">其他约定事项:</label>
											<div class="col-sm-5 f_7">
												<textarea rows="5" cols="110" name="otherItems" id="otherItems" class="form">${intAssociated.otherItems}</textarea>
											</div>
									</div>
							</div>
							<div class="f_2">
								<div class="form-group col-sm-6">
											<label for="inputtext3" class="col-sm-3 control-label f_4"><span class="span-required" style="color:red">*</span>签约原因分析:</label>
											<div class="col-sm-5 f_7">
												<textarea rows="5" cols="110" name="signReasons" id="signReasons" class="form">${intAssociated.signReasons}</textarea>
											</div>
									</div>
							</div>
							<div class="f_3">
									<div class="form-group col-sm-6">
										<div>
											<label for="inputtext3" class="col-sm-3 control-label f_4"><span class="span-required" style="color:red">*</span>提报人:</label>
											<div class="col-sm-6 f_6">
												<input type="text" class="f_5" id="createBy" readonly="readonly"  value="${intAssociated.createBy}"> 
												<input type="hidden" class="f_5" id="createById" readonly="readonly" name="createBy" value="${intAssociated.createById}"> 
											</div>
										</div>
									</div>
									<div class="form-group col-sm-6">
										<label for="inputtext3" class="col-sm-3 control-label f_4"><span class="span-required" style="color:red">*</span>提报时间:</label>
										<div class="col-sm-6 f_6">
											<div class="input-group date  o-a-form-datetime " data-date="" data-date-format="yyyy-mm-dd">
												<input class="f_5"  size="10" id="createTime1" name="createTime1" readonly="readonly" value="<fmt:formatDate value="${intAssociated.createTime}" type="both" pattern="yyyy-MM-dd HH:mm:ss"/>"  type="text" /> 
												<input type="hidden" id="createTime" name="createTime" value="<fmt:formatDate value="${intAssociated.createTime}" type="both" pattern="yyyy-MM-dd HH:mm:ss"/>" />
												<span class="input-group-addon f_time"><i class="glyphicon glyphicon-remove"></i></span>
	                           					 <span class="input-group-addon f_time"><span class="glyphicon glyphicon-calendar"></span></span>
											</div>
											<span id="createTime" class=" help-inline"
												style="color: red;"></span>
										</div>
									</div>
									
						 </div>
						 <div class="f_2">
									<div class="form-group col-sm-6">
										<div>
											<label for="inputtext3" class="col-sm-3 control-label f_4">最后修改人:</label>
											<div class="col-sm-6 f_6">
												<input type="text" class="f_5" id="updateBy" name="updateBy" value="${intAssociated.updateBy}"> 
											</div>
										</div>
									</div>
									<div class="form-group col-sm-6">
										<label for="inputtext3" class="col-sm-3 control-label f_4">最后修改时间:</label>
										<div class="col-sm-6 f_6">
											<div class="input-group date  o-a-form-datetime " data-date="" data-date-format="yyyy-mm-dd">
												<input class="f_5"  size="10" id="updateTime1" name="updateTime1" type="text" value="<fmt:formatDate value="${intAssociated.updateTime}" type="both" pattern="yyyy-MM-dd HH:mm:ss"/>" /> 
												<input type="hidden" id="updateTime" name="updateTime" value="<fmt:formatDate value="${intAssociated.updateTime}" type="both" pattern="yyyy-MM-dd HH:mm:ss"/>" />
												<span class="input-group-addon f_time"><i class="glyphicon glyphicon-remove"></i></span>
	                           					 <span class="input-group-addon f_time"><span class="glyphicon glyphicon-calendar"></span></span>
											</div>
											<span id="endDateMessage" class=" help-inline"
												style="color: red;"></span>
										</div>
									</div>
							</div>
						</div>
					</div>
				<div class="tab-pane" id="IntAttachment"> 
						<div class="panel-heading">
							<a href="#" id="AddAtt">添加</a>
						</div>
						<div>
								<table class="table table-striped table-hover o-l-table" id="IntAttTable">
									<thead>
										<tr>
											<th>附件名称</th>
											<th>供应是否提供</th>
											<th>操作</th>
										</tr>
									</thead>
									<tbody id="tableBrand">
										<c:forEach items="${intAssociated.attList}" var="attContract" varStatus="i">
											<tr>
												<td class="o-l-tab-ckb">
													${attContract.att.name}
													<input type="hidden" id="attList${i.index}.id" name="attList[${i.index}].id" value="${attContract.id}">
													<input type="hidden" id="attList${i.index}.sysContractAttId" name="attList[${i.index}].sysContractAttId" value="${attContract.sysContractAttId}">
												</td>
												<td class="o-l-tab-ckb">
													<input type="checkbox" onclick="changChecked(${i.index},'add','${attContract.id}')"  name="attList[${i.index}].isContrfim" id="attList${i.index}isContrfim"  <c:if test="${attContract.isContrfim=='1'}">checked="checked"</c:if> value="${attContract.isContrfim}">
												</td>
												<td class="o-l-tab-ckb">
													<a href="#"  onclick="remove_Att(this,${i.index},'${attContract.id}')">删除</a>
												</td>
											</tr>
										</c:forEach>
									</tbody>
								</table>
							</div>
					</div>
				
				
				<div class="tab-pane" id="workflow"> 
						<c:import url="/WEB-INF/views/bpm/workflow/workFlowInfo_edit.jsp">
							<c:param name="formName" value="com.maoye.ossp.biz.intent.entity.IntAssociated" />
							<c:param name="flowKey" value="ZCHTXQ" />
							<c:param name="businessId" value="${intAssociated.id}"/>
							<c:param name="method" value="${method}"/>
							<c:param name="isStart" value="${isStart}"/>
						</c:import> 			
					</div>
				<div class="tab-pane" id="diagram" style="overflow-x:auto;">
					<iframe id="diagram_iframe" scrolling="no" frameborder=0 width="100%">
					</iframe>
				</div>
				</div>
			</div>
			<div class="o-l-action">
					<a class="btn btn-default btn-sm pull-right o-a-button" role="button" href="${contextPath}/biz/intent/intAdvertociated/list?navId=${navId}">返回</a>
					<c:if test="${intAssociated.status == '00'}">
					<button id="save" class="btn btn-success btn-sm btn_right" type="button">保&nbsp; 存</button>
					</c:if>
					<button id="submit_wokFlow" class="btn btn-success btn-sm btn_right" type="button">提&nbsp;交</button>
			</div>
		</div>
		<!-- Modal -->
			<div class="modal fade" id="terminateDateModal" tabindex="-1"
				role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"></div>
			<!-- Modal -->
			<div class="modal fade" id="myModal" tabindex="-1" role="dialog"
				aria-labelledby="myModalLabel" aria-hidden="true"></div>
			<!-- Modal -->
			<div class="modal fade" id="supplierModal" style="width: 800"
				tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
				aria-hidden="true"></div>
			<div class="modal fade" id="barndModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"></div> 
			<div class="modal fade" id="intAssitems"  tabindex="-1"  style="display: none;"></div> 
			<div class="modal fade" id="assbasemodal"  tabindex="-1"  style="display: none;"></div> 
	</form> 
	</div>
	
	<script type="text/javascript">
	$('.o-a-form-datetime').datetimepicker({
        language:  'zh-CN',
        weekStart: 1,
        todayBtn:  1,
		autoclose: 1,
		todayHighlight: 1,
		startView: 2,
		minView: 2,
		forceParse: 0,
		format: 'yyyy-mm-dd'
    });

</script>
</body>
</html>